To reduce the bandwidth required for transmitting video data as much as possible, the video data may be compressed by using a plurality of video compression methods. The video compression methods include intra-frame compression and inter-frame compression. Nowadays, the inter-frame compression method based on motion estimation is prevalent. Specifically, the process of compressing and coding an image on a coder of the image by using an inter-frame compression method includes: The coder divides a to-be-coded image block into several equally sized image subblocks, and then, for each image subblock, searches among reference images for an image that most matches the current image subblock, and uses the most matched image as a prediction block; afterward, the coder performs a subtraction of the pixel value between the image subblock and the prediction block to obtain a residual, converts and quantizes the residual to obtain a value, performs entropy coding for the value, and finally, sends a bit stream and motion vector information that are derived from the entropy coding to a decoder, where the motion vector information represents a position difference between the current image subblock and the prediction block. On the decoder of the image, after obtaining the entropy-coded bit stream, the coder performs entropy decoding to obtain a corresponding residual and corresponding motion vector information, and then obtains a corresponding matching image block (that is, the prediction block) among the reference images according to the motion vector information, and then adds the value of each pixel in the matching image block to the value of the corresponding pixel in the residual values to obtain the value of each pixel in the current image subblock.
In existing video coding and decoding standards such as Moving Picture Experts Group (MPEG) and H.264/Advance Video Coding (AVC), an image block, also known as a macroblock or a super-macroblock, and the like, is divided into several image subblocks. The sizes of the image subblocks are 16×16, 16×8, 8×16, 8×8, 8×4, 4×8, 4×4, and the like. The motion estimation and the motion compensation are performed for the image subblocks based on such sizes. The coder of the image needs to send a codeword for identifying the division mode of the image block to the decoder of the image, and therefore, the decoder of the image knows the division mode applied on the coder of the image, and determines the corresponding prediction block according to the division mode and the motion vector information. In the existing video coding and decoding standards, the image subblocks are N×M rectangular blocks (N and M are integers greater than 0), and N is in a multiple relationship with M.
In the existing video coding and decoding standards, an image block is divided into rectangular blocks, and its disadvantage lies in that image texture information or object boundary information is not properly considered. An image generally includes texture information in various directions, and the texture generally corresponds to no rectangular areas. Moreover, an image generally includes multiple objects, and obvious boundaries exist between one object and another, or between an object and the image background. Therefore, a rectangular area may include information on two objects, or information on an object and the image background. From the perspective of image content, the rectangular area is divided into two areas that are not rectangular or symmetrically rectangular (or referred to as two irregularly divided areas). In this case, if motion estimation is performed by using the N×M rectangular blocks in the existing standards, the prediction result is not accurate.
To cope with such problems, a non-square division method is proposed, that is, a 2N×2N image block is divided into two image subblocks of any shape, where N is a positive integer greater than 0, and the shape of the image subblocks may be a triangle, a quadrangle, a pentagon, and the like. Because the 2N×2N image blocks introduce a non-square division method, an additional identification method is required by the image blocks for identifying the non-square division mode applied to the current image block. Currently available non-square division identification methods include image block geometry partition (geometry partition). The basic principles of the geometry partition method are to fit out a division line of an image block by defining an angle θ and a distance ρ, and use the division line to divide the image block into two image subblocks, where the two image subblocks may be in square or non-square shapes. The distance ρ refers to a distance from the center of the image block to the division line, as shown in FIG. 1; and the angle θ refers to a rotation angle of the division line of the image block against the X axis, as shown in FIG. 1. The division line is fitted out through the following formula:
  y  =                                          -            1                                tan            ⁢                                                  ⁢            θ                          ⁢        x            +              ρ                  sin          ⁢                                          ⁢          θ                      =          mx      +              c        .            
The prior art is defective in the following aspects:
The division line of the image block needs to be fitted out through a formula, and the fitting process involves operations of multiplication, division, and trigonometric functions. An arbitrary block may be divided in more than one mode. For example, for an image block of a 16×16 size, if the angle θ increases from 0 to 360 degrees in increments of 11.25 degrees, and the distance ρ increases from 0 to a half of the perimeter of the image block in increments of 1 scalar (s), the division modes amount to (360/11.25)×8=256. If all division modes need to be fitted through the foregoing formula, it is rather complex for the image coder to determine the division mode of the image block.